<template>
  <div class="border flex flex-v" :class="[{ 'border-lg': mode == 'lg' }]" :style="{ height: cardHeight }">
    <div class="border-hd">
      <img src="/img/dashboard/arrow.png" alt="" />
      <div class="flex-1">
        <slot name="title">{{ cardTitle }}</slot>
      </div>
      <img src="/img/dashboard/border_icon.png" alt="" />
    </div>
    <div class="flex-1 border-bd flex flex-v">
      <div class="border-bd-wrap"><slot></slot></div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {};
  },
  props: {
    mode: {
      type: String,
      default: "" // lg
    },
    cardTitle: {
      type: String,
      default: ""
    },
    cardHeight: {
      type: [String, Number],
      default: "100%"
    },
    isLonger: {
      type: Boolean,
      default: false
    },
    hasDetails: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    details () {
      this.$emit("details");
    }
  }
};
</script>

<style scoped lang="less">
.border {
  width: 5.27rem;
  max-width: 100%;
  height: 2.3rem;
  position: relative;
  background: linear-gradient(360deg, rgba(51, 204, 204, 0.05) 0%, rgba(51, 204, 204, 0) 100%);
  border: 1px solid;
  border-image: linear-gradient(
      225deg,
      rgba(51.00000075995922, 204.00000303983688, 204.00000303983688, 0),
      rgba(51.00000075995922, 204.00000303983688, 204.00000303983688, 0.20000000298023224),
      rgba(51.00000075995922, 204.00000303983688, 204.00000303983688, 0)
    )
    1 1;
  .border-hd {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(51, 204, 204, 0.4) 0%, rgba(51, 204, 204, 0) 100%);
    color: #fff;
    font-size: 0.18rem;
    letter-spacing: 0.05rem;
    padding-left: 0.05rem;
    padding-right: 0.16rem;
    line-height: 0.38rem;
    height: 0.38rem;
    position: relative;
    z-index: 10;
    color: #ffffff;
    text-shadow: 0px 0px 4px #19fafa;
    &:before {
      content: "";
      display: block;
      position: absolute;
      left: 0;
      top: 0;
      height: 0.38rem;
      width: 3px;
      background: #33cccc;
    }
  }
  .border-bd {
    position: relative;
    &:before,
    &:after {
      content: "";
      display: block;
      height: 4px;
      width: 4px;
      position: absolute;
      bottom: 0;
      background: #278989;
      right: 0;
			bottom: 0;
    }
    &:before {
			left: 0;
    }
  }
  .border-bd-wrap {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9;
  }
  &.border-lg {
    width: 100%;
    .border-hd {
      background-image: url(/img/dashboard/kuang-shang-big.png);
    }
    .border-bd {
      &:before {
        background-image: url(/img/dashboard/kuang-zhongjian-big.png);
      }
      &:after {
        background-image: url(/img/dashboard/kuang-xia-big.png);
      }
    }
  }
}
</style>
